package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MrDeviceGraphicalConfigurationMapper;
import com.ruoyi.system.domain.MrDeviceGraphicalConfiguration;
import com.ruoyi.system.service.IMrDeviceGraphicalConfigurationService;

/**
 * 设备图形参数配置Service业务层处理
 *
 * @author lsw
 * @date 2024-01-24
 */
@Service
public class MrDeviceGraphicalConfigurationServiceImpl implements IMrDeviceGraphicalConfigurationService
{
    @Autowired
    private MrDeviceGraphicalConfigurationMapper mrDeviceGraphicalConfigurationMapper;

    /**
     * 查询设备图形参数配置
     *
     * @param id 设备图形参数配置主键
     * @return 设备图形参数配置
     */
    @Override
    public MrDeviceGraphicalConfiguration selectMrDeviceGraphicalConfigurationById(Long id)
    {
        return mrDeviceGraphicalConfigurationMapper.selectMrDeviceGraphicalConfigurationById(id);
    }

    /**
     * 查询设备图形参数配置列表
     *
     * @param mrDeviceGraphicalConfiguration 设备图形参数配置
     * @return 设备图形参数配置
     */
    @Override
    public List<MrDeviceGraphicalConfiguration> selectMrDeviceGraphicalConfigurationList(MrDeviceGraphicalConfiguration mrDeviceGraphicalConfiguration)
    {
        return mrDeviceGraphicalConfigurationMapper.selectMrDeviceGraphicalConfigurationList(mrDeviceGraphicalConfiguration);
    }

    /**
     * 新增设备图形参数配置
     *
     * @param mrDeviceGraphicalConfiguration 设备图形参数配置
     * @return 结果
     */
    @Override
    public int insertMrDeviceGraphicalConfiguration(MrDeviceGraphicalConfiguration mrDeviceGraphicalConfiguration)
    {
        return mrDeviceGraphicalConfigurationMapper.insertMrDeviceGraphicalConfiguration(mrDeviceGraphicalConfiguration);
    }

    /**
     * 修改设备图形参数配置
     *
     * @param mrDeviceGraphicalConfiguration 设备图形参数配置
     * @return 结果
     */
    @Override
    public int updateMrDeviceGraphicalConfiguration(MrDeviceGraphicalConfiguration mrDeviceGraphicalConfiguration)
    {
        mrDeviceGraphicalConfiguration.setUpdateTime(DateUtils.getNowDate());
        return mrDeviceGraphicalConfigurationMapper.updateMrDeviceGraphicalConfiguration(mrDeviceGraphicalConfiguration);
    }

    /**
     * 批量删除设备图形参数配置
     *
     * @param ids 需要删除的设备图形参数配置主键
     * @return 结果
     */
    @Override
    public int deleteMrDeviceGraphicalConfigurationByIds(Long[] ids)
    {
        return mrDeviceGraphicalConfigurationMapper.deleteMrDeviceGraphicalConfigurationByIds(ids);
    }

    /**
     * 删除设备图形参数配置信息
     *
     * @param id 设备图形参数配置主键
     * @return 结果
     */
    @Override
    public int deleteMrDeviceGraphicalConfigurationById(Long id)
    {
        return mrDeviceGraphicalConfigurationMapper.deleteMrDeviceGraphicalConfigurationById(id);
    }
}

